package fun.tan90.easy.binlog.manager.property;

import fun.tan90.easy.binlog.base.model.WorkerConfig;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;


/**
 * description TODO
 * company 铁人科技
 *
 * @author 陈浩杰
 * @date 2023/7/13 10:31
 */
@Data
@ConfigurationProperties(prefix = EasyBinlogManagerProperties.PREFIX)
public class EasyBinlogManagerProperties {

    public static final String PREFIX = "easy-binlog";

    /**
     * 是否开启验证
     */
    private boolean auth = true;

    /**
     * 是否开启验证码校验
     */
    private boolean validateCaptcha = true;

    /**
     * 用户名
     */
    private String username = "admin";

    /**
     * 密码
     */
    private String password = "123456";

    /**
     * 与worker请求默认超时
     */
    private int requestTimeout = 10000;

    /**
     * 工作节点token
     */
    private String token = "chj";

    /**
     * worker配置
     */
    @NestedConfigurationProperty
    private WorkerConfig workerConfig;
}
